package chapter03;

public class Rectangle {
    public static void main(String[] args) {
        Rectangle r = new Rectangle(10,20);
        System.out.println("矩形的面积为："+r.getArea());
    }
    private int length;
    private int width;
    public Rectangle(int length,int width){
        this.length = length;
        this.width = width;
    }
    public int getArea(){
        return this.length*this.width;
    }
}
